<!DOCTYPE html>
<html lang="en">
<head>
  <link rel="stylesheet" href="{{ url_for('serve_static', path='css/main.css') }}"/>
  <style>
    * { padding: 0; margin: 0; }
    html, body {
      height: 100%;
      min-height:100%;
      padding-top: 0 !important;
      margin-bottom: 0 !important;
      font-size: .875rem;
      background-color: #e5dddb;
      /* Pattern generated using: https://www.heropatterns.com/ */
      background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23aca392' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");}
    #flDebug {
      display: none !important
    }
    * {
      box-sizing: border-box;
    }
    #editor {
      width:100% !important;
      height:5px;
      /*height: 80% !important;*/
      /*min-height: auto !important;*/
      min-height: 0 !important;
    }
    .navbar {
      height: 25px;
    }
    .navbar-brand {
      padding: 0 10px;
      height: 15px;
      line-height: 15px;
    }
    .vulnerableMarker {
      background: rgba(255, 255, 255, 0.05) !important;
    }

  </style>
  <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
        rel="stylesheet"
        integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
        crossorigin="anonymous">
  <link rel="stylesheet"
        href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.5.4/css/mdb.min.css"
        integrity="sha256-5Ch1QSVn+EqKBgzuSv/e7tDDi48eWXtkHHd+nPD/nAg=" crossorigin="anonymous"/>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"
          integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
          crossorigin="anonymous"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
          integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
          crossorigin="anonymous"></script>
  <!-- Used for rendering markdown comments -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.8.7/showdown.min.js"
          integrity="sha256-CKVcPmoyXVeFTOJvk7+k99gKxTMnKIGs9u8RKFQngVk="
          crossorigin="anonymous"></script>
</head>
<body>

{% include 'snippet.html' %}

<script>
  const EMBED_SETTINGS = {{ embed_settings|tojson }};
  const EDITOR_SETTINGS = {{ vulnerability_details.getSettings()|tojson }};
  window.EDITOR_SETTINGS = EDITOR_SETTINGS;
</script>
<script src="{{ url_for('serve_static', path='js/embed_internal.js') }}" type="module"></script>
<!-- load monaco after all the other scripts to avoid issues with AMD defines -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.14.3/min/vs/loader.js"
        integrity="sha256-DCcsMJctA23m3sXp1RrDWMEb5YtO7w+6TIUVHzDnK6Y="
        crossorigin="anonymous"></script>
<script>
  require.config(
      {paths: {'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.14.3/min/vs'}});
  // Before loading vs/editor/editor.main, define a global MonacoEnvironment that overwrites
  // the default worker url location (used when creating WebWorkers). The problem here is that
  // HTML5 does not allow cross-domain web workers, so we need to proxy the instantiation of
  // a web worker through a same-domain script
  window.MonacoEnvironment = {
    getWorkerUrl: function (workerId, label) {
      return `data:text/javascript;charset=utf-8,${encodeURIComponent(`
        self.MonacoEnvironment = {
          baseUrl: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.14.3/min/'
        };
        importScripts('https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.14.3/min/vs/base/worker/workerMain.js');`
      )}`;
    }
  };
</script>

</body>
</html>